#include<iostream>
#include<vector>
#include<string>

using namespace std;

int convertTime(string current, string correct) {
    int st = atoi(current.substr(0, 2).c_str()) * 60 + atoi(current.substr(3).c_str());
    int end = atoi(correct.substr(0, 2).c_str()) * 60 + atoi(correct.substr(3).c_str());
    int diff = end - st;
    int res = 0, i = 0;
    vector<int> ope = { 60,15,5,1 };
    while (diff)
    {
        while (diff < ope[i])
            i++;
        res += diff / ope[i];
        diff %= ope[i];
    }
    return res;
}